package com.muyu.system.domain.model;

import com.muyu.common.core.web.model.QueryModel;
import com.muyu.system.domain.req.SysDictDataListReq;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 参数配置 分页 模型
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SysDictDataPageQueryModel extends QueryModel<SysDictDataPageQueryModel> {

    /**
     * 字典类型
     */
    private String dictType;
    /**
     * 字典标签
     */
    private String dictLabel;
    /**
     * 状态（0正常 1停用）
     */
    private String status;




    public static SysDictDataPageQueryModel reqBuild(SysDictDataListReq sysDictDataListReq) {
        SysDictDataPageQueryModel sysDictDataPageQueryModel = SysDictDataPageQueryModel.builder()
                .dictType(sysDictDataListReq.getDictType())
                .dictLabel(sysDictDataListReq.getDictLabel())
                .status(sysDictDataListReq.getStatus())
                .build();
        sysDictDataPageQueryModel.domainBuild(sysDictDataListReq);
        return sysDictDataPageQueryModel;
    }
}
